package cc.example.mybatislike.db.gorm;

import java.util.HashMap;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate;
import org.springframework.stereotype.Repository;

@Repository
public class GStudentRepository {

  @Autowired
  @Qualifier("gormJdbcTemplate")
  private NamedParameterJdbcTemplate jdbcTemplate;

  public List<String> getStudents() {
    return jdbcTemplate.queryForList("select name from student", new HashMap<>(), String.class);
  }

}
